﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinForm1
{
    class Points
    {
        private double m_dx;
        private double m_dy;
        //Constructor
        Points(double dx, double dy)
        {
            m_dx = dx;
            m_dy = dy;
        }
        public double dX 
        {
            set {m_dx = value;}
            get { return m_dx; }
        }

        public double dY
        {
            set { m_dy = value; }
            get { return m_dy; }
        }
        //operator must public and static
        public static Points operator+(Points pt1, Points pt2)
        {
            return new Points(pt1.m_dx + pt2.m_dx, pt1.m_dy + pt2.m_dy);
        }
    }
}
